import request from '@/utils/request'

// 查询互市进出境申报单列表
export function listIeborderDeclBills(query) {
  return request({
    url: '/bt/ieborderDeclBills/list',
    method: 'get',
    params: query
  })
}

// 查询互市进出境申报单详细
export function getIeborderDeclBills(id) {
  return request({
    url: '/bt/ieborderDeclBills/getInfo/' + id,
    method: 'get'
  })
}

// 重发互市进出境申报单
export function resendIeborderDeclBills(id) {
  return request({
    url: '/bt/ieborderDeclBills/resend/' + id,
    method: 'get'
  })
}

// 查询互市进出境申报单详细--declareId
export function getByDeclareId(declareId) {
  return request({
    url: '/bt/ieborderDeclBills/getByDeclareId/' + declareId,
    method: 'get'
  })
}

// 新增互市进出境申报单
export function addIeborderDeclBills(data) {
  return request({
    url: '/bt/ieborderDeclBills/add',
    // url: '/bt/btUnifiedDeclaration/ieborderBillAdd',
    method: 'post',
    data: data
  })
}

// 修改互市进出境申报单
export function updateIeborderDeclBills(data) {
  return request({
    url: 'bt/ieborderDeclBills/edit',
    method: 'post',
    data: data
  })
}

// 变更互市进出境申报单
export function modifyIeborderDeclBills(data) {
  return request({
    url: 'bt/ieborderDeclBills/modify',
    method: 'post',
    data: data
  })
}

// 撤销互市进出境申报单
export function revokedIeborderDeclBills(data) {
  return request({
    url: 'bt/ieborderDeclBills/revoked',
    method: 'post',
    data: data
  })
}

// 删除互市进出境申报单
export function delIeborderDeclBills(id) {
  return request({
    url: '/bt/ieborderDeclBills/remove/' + id,
    method: 'get'
  })
}

// 导出互市进出境申报单
export function exportIeborderDeclBills(query) {
  return request({
    url: '/bt/ieborderDeclBills/export',
    method: 'get',
    params: query
  })
}

// 申报互市进出境申报单
export function declIeborderDeclBills(id) {
  return request({
    url: '/bt/ieborderDeclBills/decl/' + id,
    method: 'post',
  })
}

// 申报互市进出境申报单-确认申报
export function declIeborderDeclBillsConfirm(data) {
  return request({
    url: '/bt/terminal/ieborderDeclBills/bmTerminalConfirm',
    method: 'post',
    data
  })
}

//生成货值收费单
export function ieborderGenFee(id) {
  return request({
    url: '/bt/ieborderDeclBills/ieborderGenFee/' + id,
    method: 'get'
  })
}
